DR1='H:'
DR2='N:'
F1='PRODUCT'
F2='COMPANY'
F21='nmcomp'
F3='AEABAYA'
F31="AEA'BAYA"
F32="TGL'BAYA"
F4='AEA_INV1'
F41="AEA'INV1"
F42="COM'INV1"
F43="TGL'INV1"
F44="PRO'INV1"
F45="DAT'PRO1"
F5='AEA_INV2'
F51="AEA'INV2"
F52="PRO'INV2"
F6='AUTHORIZ'
F7='UNPAID'
F8='CURRENT'
F9='INCOMPAY'
F71='UNPAIDC'
F81='CURRENTC'
F91='INCOMPAC'
F72='UNPAIDP'
F82='CURRENTP'
F92='INCOMPAP'
F10='SALERES'
f11='compres'
f12='comprec'
clos all
SELE 1
SET EXCLU OFF
USE &DR1&F1
IF NET_USE("&DR1&F1",.T.,'1',10)
   PACK
   index on prod_code to &DR1&F1
ENDIF
SET EXCLU OFF
USE
SELE 1
SET EXCLU OFF
USE &DR2&F2
IF NET_USE("&DR2&F2",.T.,'1',10)
   PACK
   index on COMP_CODE to &DR2&F2
   INDEX ON COMP_NAME TO &DR2&F21
ENDIF
SET EXCLU OFF
USE
SELE 1
SET EXCLU OFF
USE &DR1&F3
IF NET_USE("&DR1&F3",.T.,'1',10)
   PACK
   index on COMP_CODE+DTOS(TANG_BY) to &DR1&F31
   INDEX ON NOFT_BY+DTOS(TANG_BY) to &DR1&F32
ENDIF
SET EXCLU OFF
USE
DO RE_INDI1
SET EXCLU OFF
USE
DO RE_INDI2
SET EXCLU OFF
CLOS ALL
return
